<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    let obj = {name:'',age:'',sex:''  },
    defaultName = ["这是姓名默认值1","这是年龄默认值1","这是性别默认值1"];
  Object.keys(obj).forEach(key => {
    Object.defineProperty(obj, key, {
      get() {
        return defaultName;
      },
      set(value) {
        defaultName = value;
      }
    });
  });

  // console.log(obj.name);
  // console.log(obj.age);
  // console.log(obj.sex);




  var arr=[1,2,3,4,5,6]

  for(var i=0;i<arr.length;i++){
    if(arr[i]>3){
      return
    }
    console.log(arr[i]);
  }
  // arr.forEach(item=>{
  //   if(item>3){
  //     return
  //   }
  //   console.log(item);
  // })

  console.log(222);
</script>
</html>